package com.huang.server;

import com.huang.server.factory.ProviderFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
/*feignClient的三个属性。指定服务，指定转移接口，指定异常处理方法
在配置类中开启feign
*
* */
@FeignClient(name = "provider" ,contextId = "RemoteProviderService",fallbackFactory = ProviderFallbackFactory.class)
public interface RemoteProviderService {
    @GetMapping("/echo2/{msg}")
    public String echoMessage(@PathVariable("msg") String msg);
}
